package com.yimu.ymblog.admin.convert;

import com.yimu.ymblog.common.domain.admin.vo.category.FindVisCategoryListRspVO;
import com.yimu.ymblog.common.domain.dos.CategoryDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface VisualizationConvert {
    /**
     * 初始化 convert 实例
     */
    VisualizationConvert INSTANCE = Mappers.getMapper(VisualizationConvert.class);


    /**
     * DO 转 VO
     * @param bean
     * @return
     */
    @Mapping(target = "value", expression = "java(bean.getArticlesTotal())")
    FindVisCategoryListRspVO convertDO2VO(CategoryDO bean);
}

